package org.smart4j.chapter.proxy;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.smart4j.chapter.annotation.LtdProxy;
import org.smart4j.framework.annotation.Aspect;
import org.smart4j.framework.proxy.AspectProxy;

import java.lang.reflect.Method;

/**
 * Created by chinalin on 2017/3/29.
 */
@Aspect(value = LtdProxy.class)
public class ltdProxy extends AspectProxy{
    private static final Logger LOGGER = LoggerFactory.getLogger(ltdProxy.class) ;
    @Override
    public void before(Class<?> cls, Method method, Object[] params) throws Throwable {
        LOGGER.error("程序执行之前");
    }

    @Override
    public void after(Class<?> cls, Method method, Object[] params, Object result) throws Throwable {
        LOGGER.error("程序执行之后");
    }
}
